﻿@{
    Layout = null;
}

<form name="formCliente" novalidate ng-controller="NovoController" ng-submit="salvar(Usuario)">
    <label>Nome:</label>
    <input type="text" name="Nome" ng-model="Usuario.Nome" ng-required="true"/>
    <span class="error" ng-show="submitted && formCliente.Nome.$invalid">Required!</span><br/>
    <label>Estado:</label>
    <input type="text" name="Estado" ng-model="Usuario.Estado" ng-minlength="2" ng-required="true"/>
    <span class="error" ng-show="submitted && formCliente.Estado.$invalid">Minimo 2 caracteres!</span><br/>
    <label>Cep:</label>
    <input type="text" name="Cep" ng-model="Usuario.Cep" ng-pattern="/^\d{5}-\d{3}$/" ng-required="true"/>
    <span class="error" ng-show="submitted && formCliente.Cep.$invalid">Cep invalido!</span><br/>
    <input type="submit" value="Salvar" />
</form>